home *** CD-ROM | disk | FTP | other *** search
- /*
- * The original copyright owners of the accompanying source code files have
- * agreed to place such code into the public domain. Accordingly, anyone
- * who receives or obtains a copy of such source code is freely entitled to
- * reproduce, use and otherwise exploit such code (including the right to
- * make derivative works), at his/her own risk and expense, without any
- * obligation or liability to the original copyright owners.
- *
- * We would appreciate (but do not require) that the following message be
- * included in any derivative works:
- *
- * "Portions of this program were developed by Peter Broadwell, Rob Myers
- * and Robin Schaufler while working in Silicon Valley."
- *
- * The accompanying source code files and related documentation materials
- * are distributed on an "AS IS" basis, without any warranties or
- * guarantees of any kind. All implied warranties, including the implied
- * warranties of merchantability and of fitness for any particular purpose,
- * are expressly disclaimed.
- */
- #include "gl.h"
- #include "geom.h"
- #include "selectors.h"
- #include "class.h"
- #include "classIds.h"
- #include "mbox.h"
- #include "individual.h"
- #include "behavior.h"
- #include "doers.h"
-
- #include "colors.h"
-
- extern class indivClass;
- model ghostImage;
-
- extern char *initGhost();
-
- fcnTable ghostTable[] = {
- INIT, initGhost, /* instantiate and initialize the model */
- EOTABLE,
- };
-
- class ghostClass = {
- &indivClass,
- ghostTable,
- sizeof(individual),
- GHOST,
- };
-
- individual ghostTemplate = {
- /* inst */
- &ghostClass, /* myClass pointer */
- NULL, /* classFunctions */
- 0, /* nFunctions */
- /* mailbox */
- NULL, /* subscribers */
- NULL, /* subscribedTo */
- /* individual */
- {0,0,0}, /* position */
- {0,0,0}, /* lastPosition */
- {0,0,0}, /* delta */
- {0,0,0}, /* velocity */
- {0,0,0}, /* avelocity */
- {0,0,0}, /* acceleration */
- 0.0, /* speed */
- {0,0,0}, /* heading */
- {0,0,0}, /* rotation */
- {0,0,0}, /* influence */
- 1.0, /* scale */
- &ghostImage, /* model */
- TRUE, /* flags */
- NULL, /* curVars */
- };
-
- point ghostImagePoints[] = {
- { 0, 0, 0, }, /* gratuitous vertex 0 */
- { 000, 000, 000, },
- { -300, 000, 400, },
- { -300, 000, -550, },
- };
-
- /* null terminated polys, double null at end */
- long ghostImageVertices[] = {
- 1,2,3,0,
- 1,3,2,0,
- 0,
- };
-
- model ghostImage = {
- NULL, /* next model segment */
- NULL, /* child model segments */
- 0, /* geometry compiled yet? */
- 0, /* compiled geometry object Id */
- ghostImagePoints, /* point dictionary */
- ghostImageVertices, /* polygon descriptions */
- { -150,0,-75}, /* centroid */
- GHOST_COLOR, /* color */
- GHOST_TEXTURE, /* texture */
- TRUE, /* outlined */
- { 0,0,0}, /* rotation */
- { 100,0,-200}, /* translation */
- { 1.0,1.0,1.0}, /* scale */
- 10, /* declasse */
- };
-
-